<template>
  <view class="main">
    <text class="title-text">默认样式</text>
    <eui-echarts-line :chartList="lineList"></eui-echarts-line>

    <text class="title-text">非平滑曲线</text>
    <eui-echarts-line :chartList="lineList" :isSmooth="isSmooth"></eui-echarts-line>

    <text class="title-text">多条数据</text>
    <eui-echarts-line :chartList="lineList2" :xAxisList="xAxisList"></eui-echarts-line>
  </view>
</template>

<script>
export default {
  name: "index",
  data() {
    return{
      // 折线图数据
      lineList: [
        { name: '数据1', data: [820, 932, 901, 934, 1290, 1330, 1320] }
      ],
      lineList2: [
        { name: '数据1', data: [82, 93, 90, 93, 129, 133, 132] },
        { name: '数据2', data: [60, 100, 120, 99, 77, 102] }
      ],
      // 横轴坐标轴名称
      xAxisList: ['一','二','三','四','五','六','七'],
      // 折线图外层容器样式
      chartStyle: 'width: 710rpx; height: 450rpx; background: #FFFFFF',
      // 是否平滑曲线
      isSmooth: false,
    }
  },
  methods: {}
}
</script>

<style scoped>
.main {
  background-color: #F4F4F4;
  display: flex;
  padding: 0;
  width: 100%;
  height: 3000rpx;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}
.title-text {
  margin-top: 33rpx;
  font-size: 32rpx;
}

</style>
